"""
    构造数据
"""
import json

from config import BASE_DIR


def build_data(path):
    # filepath = BASE_DIR+"/data/login_data.json"
    filepath = BASE_DIR+path
    # 创建一个空列表 [{},{},{}] --> [(),(),()]
    arrs= []
    with open(filepath,"r",encoding="utf-8") as f:
        datas = json.load(f)
        for data in datas:
            arrs.append(tuple(data.values()))
        return arrs



if __name__ == '__main__':
    print(build_data())